import PropTypes from 'prop-types'
import React, { memo } from 'react'
import { LongforWrapper } from './style'
import SectionHeader from '@/components/section-header'
import SectionRooms from '@/components/section-rooms'
import LongForItem from '@/components/longfor-item'
import ScrollView from '@/base-ui/scroll-view'
const LongFor = memo((props) => {
  const {infoData} = props
  return (
    <LongforWrapper>
        <SectionHeader title={infoData?.title} subtitle={infoData?.subtitle}></SectionHeader>
        <div className="longfor-list">
          <ScrollView>
          {
            infoData?.list.map((item) => {
              return <LongForItem itemData={item} key={item.city}/>
            })
          }
          </ScrollView>
        </div>
        
    </LongforWrapper>
  )
})

LongFor.propTypes = {
  infoData: PropTypes.object
}

export default LongFor